﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog.Master" AutoEventWireup="true"
    CodeBehind="ShuntingTrackInfoEdit.aspx.cs" Inherits="NetDon.OA.Portal.Shunting.ShuntingInfoEdit" %>

<%@ Import Namespace="NetDon.OA.Interface" %>
<%@ Import Namespace="NetDon.Utilities" %>
<%@ Register Src="../Controls/RequiredMark.ascx" TagName="RequiredMark" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">

        $(document).ready(function () {
            var dialog;
            if (window.top == window) {
                dialog = window;
            } else {

                dialog = window.top.Page.Dialog.find(function (item) {
                    return item._contentFrame.contentWindow == window;
                });

            }
            var fieldId = $get('<%=this.fieldIds.ClientID %>');


            var reloadButton = $get('<%=btnReLoadIds.ClientID %>');
            if (dialog && !reloadButton.disabled) {

                $text(fieldId, dialog._context.dialogArguments.Ids);
                reloadButton.click();


            }
        });



        function calculateDriverDelayedDays(object, driverAppointedDate, driverOnboardDate, driverAppointedDateHour, driverAppointedDateMinute, driverOnboardDateHour, driverOnboardDateMinute, driverDelayedHours) {

            var start = $(("#" + driverAppointedDate)).val();
            var end = $(("#" + driverOnboardDate)).val();
            var re = /^(\d{4})\S(\d{1,2})\S(\d{1,2})$/;
            var startDate, endDate;
            if (re.test(start)) {
                startDate = new Date(RegExp.$1, RegExp.$2 - 1, RegExp.$3);

            }
            if (re.test(end)) {
                endDate = new Date(RegExp.$1, RegExp.$2 - 1, RegExp.$3);

            }
            if (startDate && endDate) {
                //add hour
                var txtDriverAppointedDateHour = parseInt($("#" + driverAppointedDateHour).val());
                if (txtDriverAppointedDateHour) {
                    startDate = DateAdd("h ", txtDriverAppointedDateHour, startDate);
                }

                var txtDriverOnboardDate = parseInt($("#" + driverOnboardDateHour).val());
                if (txtDriverOnboardDate) {
                    endDate = DateAdd("h ", txtDriverOnboardDate, endDate);
                }
                //add minute
                var txtDriverAppointedDateMinute = parseInt($("#" + driverAppointedDateMinute).val());
                if (txtDriverAppointedDateMinute) {
                    startDate = DateAdd("M ", txtDriverAppointedDateMinute, startDate);
                }

                var txtDriverOnboardDateMinute = parseInt($("#" + driverOnboardDateMinute).val());
                if (txtDriverOnboardDateMinute) {
                    endDate = DateAdd("M ", txtDriverOnboardDateMinute, endDate);
                }
                if (endDate < startDate) {
                    //                    $alert("车辆到厂时间不可以小于预约时间");
                    //                    object.focus();
                    $("#" + driverDelayedHours).text("0");
                    return;
                } else {

                    var dayInterval = (Math.floor((endDate - startDate) / (1000 * 60 * 60 * 1)));

                    $("#" + driverDelayedHours).text(dayInterval.toString());
                }
            }

        }

        function calculateUnitCosts(object) {
            var shuntingCost = $(object).val();
            var actualEntruckingAmount = $("#<%=this.hiddenActualEntruckingAmount.ClientID %>").val();
            if (actualEntruckingAmount) {
                var unitCost = (parseFloat(shuntingCost) / parseFloat(actualEntruckingAmount)).toFixed(4);
                $("#<%=this.txtUnitCost.ClientID %>").text(unitCost);
            } else {
                $("#<%=this.txtUnitCost.ClientID %>").text("0");
            }
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="panelBasic" runat="server" DefaultButton="btnSave">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td>
                    <NetDon:FormPanel ID="FormPanelBasicInfo" runat="server" CaptionAlign="NotSet" RepeatColumns="2"
                        SkinID="ProductView">
                        <Items>
                            <NetDon:FormItem FullRow="True" HeaderVisible="False">
                                <ContentTemplate>
                                    <asp:Literal ID="Literal3" runat="server" Text="基本信息"></asp:Literal>
                                </ContentTemplate>
                                <ContentStyle ForeColor="#037CC6" Font-Bold="true"></ContentStyle>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="订单编号">
                                <ContentTemplate>
                                    <asp:Label runat="server" ID="txtOrderCode" Text='<%# Eval("OrderCode") %>'>	</asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="回单状态">
                                <ContentTemplate>
                                    <asp:Label runat="server" ID="txtOrderStatus" Text='<%# EnumUtilities.GetDescription((OrderStatus)Enum.Parse(typeof(OrderStatus), Eval("OrderStatus").ToString())) %>'>	</asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="客户">
                                <ContentTemplate>
                                    <asp:Label runat="server" ID="Label1" Text='<%#GetCustomerName(Eval("CustomerId")) %>'>	</asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="承运货物">
                                <ContentTemplate>
                                    <asp:Label runat="server" ID="Label2" Text='<%#GetDictionaryItemName(Eval("GoodsShippedTypeId")) %>'>	</asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="线路分类">
                                <ContentTemplate>
                                    <asp:Label runat="server" ID="Label3" Text='<%#GetDictionaryItemName(Eval("RouteTypeId")) %>'>	</asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="出单日期">
                                <ContentTemplate>
                                    <asp:Label ID="Label44" Text='<%#Eval("ReceivingOrderDate") != null ? ((DateTime)Eval("ReceivingOrderDate")).ToString("yyyy-MM-dd") : ""%>'
                                        runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="运输计划号">
                                <ContentTemplate>
                                    <asp:Label ID="Label344" Text='<%#Bind("TransportationPlanCode") %>' runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="结算方式">
                                <ContentTemplate>
                                    <asp:Label runat="server" ID="Label4" Text='<%#EnumUtilities.GetDescription(EnumUtilities.Parse<CheckoutType>(Eval("CheckoutType").ToString())) %>'>	</asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="下单车数">
                                <ContentTemplate>
                                    <asp:Label ID="Label5" Text='<%#Eval("OrderVehicleNumber") %>' runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="下单数量">
                                <ContentTemplate>
                                    <asp:Label ID="Label9"   Text='<%#Convert.ToDecimal(Eval("OrderQuantity")).ToString("#,###.00")%>' runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="下单材积（方）">
                                <ContentTemplate>
                                    <asp:Label ID="Label7" Text='<%#Convert.ToDecimal(Eval("OrderVolumn")).ToString("#,###.000")%>'
                                        runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="下单重量">
                                <ContentTemplate>
                                    <asp:Label ID="Label6" Text='<%#Convert.ToDecimal(Eval("OrderWeight")).ToString("#,###.000")%>'
                                        runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="客户要求（地点）">
                                <ContentTemplate>
                                    <asp:Label ID="Label8" Text='<%#Bind("EntruckingDetails") %>' runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="送货城市">
                                <ContentTemplate>
                                    <%#Server.HtmlEncode(GetCityName(Eval("Id")))%>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <%--     <NetDon:FormItem HeaderText="送货地点">
                                <ContentTemplate>
                                    <asp:Label ID="Label9" Text='<%#Eval("DeliveryAddress") %>' runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>--%>
                        </Items>
                    </NetDon:FormPanel>
                </td>
            </tr>
            <tr>
                <td>
                    <NetDon:FormPanel ID="FormPanelIssuringOrderInfo" runat="server" CaptionAlign="NotSet"
                        RepeatColumns="2">
                        <Items>
                            <NetDon:FormItem FullRow="True" HeaderVisible="False">
                                <ContentTemplate>
                                    <asp:Literal ID="Literal1" runat="server" Text="调车信息"></asp:Literal>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="应发货日期">
                                <ContentTemplate>
                                    <asp:TextBox ID="txtPlannedShippingDate" Text='<%#Eval("PlannedShippingDate") != null ? ((DateTime)Eval("PlannedShippingDate")).ToString("yyyy-MM-dd") : ""%>'
                                        runat="server"></asp:TextBox>
                                    <uc1:RequiredMark ID="markStoreCode" runat="server" />
                                    <asp:CalendarExtender ID="txtPlannedShippingDateCalendarExtender1" runat="server"
                                        Animated="False" Enabled="True" FirstDayOfWeek="Sunday" TargetControlID="txtPlannedShippingDate"
                                        Format="yyyy-MM-dd">
                                    </asp:CalendarExtender>
                                    <asp:CustomValidator ID="txtPlannedShippingDateCustomValidator1" ClientValidationFunction="validateDateText"
                                        runat="server" ErrorMessage="应发货日期无效." Display="None" ControlToValidate="txtPlannedShippingDate"
                                        OnServerValidate="DateValidator_ServerValidate"></asp:CustomValidator>
                                    <asp:RequiredFieldValidator ID="rfvStoreCode" runat="server" ControlToValidate="txtPlannedShippingDate"
                                        Display="None" ErrorMessage="请输入应发货日期" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="调车人">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlShuntingPerson" DataSourceID="ddsShuntingPerson" AppendDataBoundItems="True"
                                        runat="server" DataTextField="Name" DataValueField="Value">
                                    </asp:DropDownList>
                                    <NetDon:DictionaryDataSource ID="ddsShuntingPerson" runat="server" CategoryName="调车人"
                                        EmptyItemType="Select">
                                    </NetDon:DictionaryDataSource>
                                    <uc1:RequiredMark ID="RequiredMark2" runat="server" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlShuntingPerson"
                                        Display="None" ErrorMessage="请选择调车人" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="调车成本">
                                <ContentTemplate>
                                    <asp:TextBox ID="txtShuntingCost" runat="server" Text='<%#Convert.ToDecimal(Eval("ShuntingCost")).ToString("#,###.00")%>'
                                        MaxLength="9" Width="60px" Style="text-align: right"></asp:TextBox>
                                    <NetDon:NumericEditExtender ID="NumericEditExtender4" runat="server" TargetControlID="txtShuntingCost"
                                        DataMode="Double">
                                    </NetDon:NumericEditExtender>
                                    <uc1:RequiredMark ID="RequiredMark7" runat="server" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtShuntingCost"
                                        Display="None" ErrorMessage="请输入调车成本" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="成本单价">
                                <ContentTemplate>
                                    <asp:Label ID="txtUnitCost" Style="text-align: right" Text='<%#Convert.ToDecimal(Eval("UnitCost")).ToString("#,###.0000")%>'
                                        runat="server"></asp:Label>
                                </ContentTemplate>
                            </NetDon:FormItem>
                                  <NetDon:FormItem HeaderText="是否客户回访">
                                <ContentTemplate>
                                    <asp:CheckBox ID="chbIsClientReturnVisit"  Checked='<%#Convert.ToBoolean(Eval("IsClientReturnVisit"))%>'
                                        runat="server"></asp:CheckBox>
                                </ContentTemplate>
                            </NetDon:FormItem>
                                  <NetDon:FormItem HeaderText="客户电话">
                                <ContentTemplate>
                                    <asp:TextBox ID="txtClientTelephone" Text='<%#(Eval("ClientTelephone")).ToString()%>'
                                        runat="server"></asp:TextBox>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="车辆信息" FullRow="True">
                                <ContentTemplate>
                                    <asp:Repeater runat="server" ID="rptVehicleInfo" OnItemDataBound="rptVehicleInfo_ItemDataBound"
                                        OnItemCreated="rptVehicleInfo_ItemCreated">
                                        <ItemTemplate>
                                            <table cellspacing="0" class="FormPanel" rules="none">
                                                <tbody>
                                                    <tr>
                                                        <td class="ItemHeader">
                                                            <label>
                                                                拼车费(￥)</label>
                                                        </td>
                                                        <td class="ItemContent">
                                                            <asp:HiddenField runat="server" ID="hiddenIssuringOrderVehicleId" Value='<%#Bind("Id") %>' />
                                                            <asp:TextBox ID="txtCarSharingPrice" Text='<%#Convert.ToDecimal(Eval("CarSharingPrice")).ToString("#,###.00")%>'
                                                                runat="server" MaxLength="9" Width="60px" Style="text-align: right"></asp:TextBox>
                                                            <NetDon:NumericEditExtender ID="NumericEditExtender3" runat="server" TargetControlID="txtCarSharingPrice"
                                                                DataMode="Double">
                                                            </NetDon:NumericEditExtender>
                                                        </td>
                                                        <td style="width: 10px;" />
                                                        <td class="ItemHeader">
                                                        <%--    <label>
                                                                卸货费(￥)</label>--%>
                                                        </td>
                                                        <td class="ItemContent">
                                                         <%--   <asp:TextBox ID="txtGoodsUnloadingPirce" Text='<%#Convert.ToDecimal(Eval("GoodsUnloadingPirce")).ToString("#,###.00")%>'
                                                                runat="server" MaxLength="9" Width="60px" Style="text-align: right"></asp:TextBox>
                                                            <NetDon:NumericEditExtender ID="NumericEditExtender5" runat="server" TargetControlID="txtGoodsUnloadingPirce"
                                                                DataMode="Double">
                                                            </NetDon:NumericEditExtender>--%>
                                                        </td>
                                                    </tr>
                                                    <tr class="ItemAlternating">
                                                        <td class="ItemHeader">
                                                            车型
                                                        </td>
                                                        <td colspan="4" class="ItemContent">
                                                            <table cellspacing="0" class="FormPanel" rules="none">
                                                                <tbody>
                                                                    <tr>
                                                                        <td colspan="2" class="ItemContent">
                                                                            <asp:DropDownList ID="ddlVechicleModel" runat="server" DataSourceID="ObjectDataSourceVechicleModel"
                                                                                DataTextField="ModelName" DataValueField="Id" AutoPostBack="True" AppendDataBoundItems="true"
                                                                                OnSelectedIndexChanged="ddlVechicleModel_SelectedIndexChanged">
                                                                            </asp:DropDownList>
                                                                            <asp:ObjectDataSource ID="ObjectDataSourceVechicleModel" runat="server" OldValuesParameterFormatString="original_{0}"
                                                                                SelectMethod="RetrieveVechicleModel" TypeName="NetDon.OA.Business.MiscDataSource">
                                                                                <SelectParameters>
                                                                                    <asp:Parameter Name="areaId" />
                                                                                </SelectParameters>
                                                                            </asp:ObjectDataSource>
                                                                        </td>
                                                                        <td style="width: 10px;" />
                                                                        <td class="ItemHeader">
                                                                            长(米)
                                                                        </td>
                                                                        <td class="ItemContent">
                                                                            <asp:Label ID="txtLength" runat="server" Width="40px"></asp:Label>
                                                                        </td>
                                                                        <td style="width: 10px;" />
                                                                        <td class="ItemHeader">
                                                                            宽(米)
                                                                        </td>
                                                                        <td class="ItemContent">
                                                                            <asp:Label ID="txtWidth" runat="server" Width="40px"></asp:Label>
                                                                        </td>
                                                                        <td style="width: 10px;" />
                                                                        <td class="ItemHeader">
                                                                            高(米)
                                                                        </td>
                                                                        <td class="ItemContent">
                                                                            <asp:Label ID="txtHeight" runat="server" Width="40px"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                    <tr class="ItemAlternating">
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="ItemHeader">
                                                            <label>
                                                                车牌号</label>
                                                        </td>
                                                        <td class="ItemContent">
                                                            <asp:TextBox ID="txtVehicleNumber" Text='<%#Bind("VehicleNumber") %>' MaxLength="20"
                                                                runat="server"></asp:TextBox>
                                                        </td>
                                                        <td style="width: 10px;" />
                                                        <td class="ItemHeader">
                                                            <label>
                                                                司机姓名</label>
                                                        </td>
                                                        <td class="ItemContent">
                                                            <asp:TextBox ID="txtDriverName" Text='<%#Bind("DriverName") %>' MaxLength="20" runat="server"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr class="ItemAlternating">
                                                        <td class="ItemHeader">
                                                            <label>
                                                                司机电话</label>
                                                        </td>
                                                        <td class="ItemContent">
                                                            <asp:TextBox ID="txtDriverTelephone" Text='<%#Bind("DriverTelephone") %>' MaxLength="20"
                                                                runat="server"></asp:TextBox>
                                                        </td>
                                                        <td style="width: 10px;" />
                                                        <td class="ItemHeader">
                                                            预约时间
                                                        </td>
                                                        <td class="ItemContent">
                                                            <asp:TextBox ID="txtDriverAppointedDate" Text='<%#Eval("DriverAppointedDate") != null ? ((DateTime)Eval("DriverAppointedDate")).ToString("yyyy-MM-dd") : ""%>'
                                                                Width="120px" runat="server"></asp:TextBox>
                                                            <asp:TextBox ID="txtDriverAppointedDateHour" runat="server" Width="20px"></asp:TextBox>
                                                            <NetDon:NumericEditExtender ID="NumericEditExtender1" runat="server" MaxValue="23"
                                                                MinValue="0" TargetControlID="txtDriverAppointedDateHour" DataMode="Integer">
                                                            </NetDon:NumericEditExtender>
                                                            :
                                                            <asp:TextBox ID="txtDriverAppointedDateMinute" runat="server" Width="20px"></asp:TextBox>
                                                            <NetDon:NumericEditExtender ID="NumericEditExtender2" runat="server" MaxValue="59"
                                                                MinValue="0" TargetControlID="txtDriverAppointedDateMinute" DataMode="Integer">
                                                            </NetDon:NumericEditExtender>
                                                            <%--    <uc1:RequiredMark ID="RequiredMark4" runat="server" />  <asp:MaskedEditExtender ID="txtDriverAppointedDateMaskedEditExtender1" runat="server"
                                        ClearTextOnInvalid="True" ClipboardEnabled="False" CultureAMPMPlaceholder=""
                                        CultureCurrencySymbolPlaceholder="" CultureDateFormat="YMD" CultureDatePlaceholder=""
                                        CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                                        Enabled="True" MaskType="Date" TargetControlID="txtDriverAppointedDate" UserDateFormat="YearMonthDay"
                                        Mask="9999-99-99" Century="2000">
                                    </asp:MaskedEditExtender>--%>
                                                            <asp:CalendarExtender ID="txtDriverAppointedDateCalendarExtender1" runat="server"
                                                                Animated="False" Enabled="True" FirstDayOfWeek="Sunday" TargetControlID="txtDriverAppointedDate"
                                                                Format="yyyy-MM-dd">
                                                            </asp:CalendarExtender>
                                                            <asp:CustomValidator ID="txtDriverAppointedDateCustomValidator1" ClientValidationFunction="validateDateText"
                                                                runat="server" ErrorMessage="预约时间无效." Display="None" ControlToValidate="txtDriverAppointedDate"
                                                                OnServerValidate="DateValidator_ServerValidate"></asp:CustomValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="ItemHeader">
                                                            车辆到厂时间
                                                        </td>
                                                        <td class="ItemContent">
                                                            <asp:TextBox ID="txtDriverOnboardDate" Text='<%#Eval("DriverOnboardDate") != null ? ((DateTime)Eval("DriverOnboardDate")).ToString("yyyy-MM-dd") : ""%>'
                                                                Width="120px" runat="server"></asp:TextBox>
                                                            <asp:TextBox ID="txtDriverOnboardDateHour" runat="server" Width="20px"></asp:TextBox>
                                                            <NetDon:NumericEditExtender ID="NumericEditExtender6" runat="server" MaxValue="23"
                                                                MinValue="0" TargetControlID="txtDriverOnboardDateHour" DataMode="Integer">
                                                            </NetDon:NumericEditExtender>
                                                            :
                                                            <asp:TextBox ID="txtDriverOnboardDateMinute" runat="server" Width="20px"></asp:TextBox>
                                                            <NetDon:NumericEditExtender ID="NumericEditExtender7" runat="server" MaxValue="59"
                                                                MinValue="0" TargetControlID="txtDriverOnboardDateMinute" DataMode="Integer">
                                                            </NetDon:NumericEditExtender>
                                                            <%--  <uc1:RequiredMark ID="RequiredMark5" runat="server" />    <asp:MaskedEditExtender ID="txtDriverOnboardDateMaskedEditExtender2" runat="server"
                                        ClearTextOnInvalid="True" ClipboardEnabled="False" CultureAMPMPlaceholder=""
                                        CultureCurrencySymbolPlaceholder="" CultureDateFormat="YMD" CultureDatePlaceholder=""
                                        CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                                        Enabled="True" MaskType="Date" TargetControlID="txtDriverOnboardDate" UserDateFormat="YearMonthDay"
                                        Mask="9999-99-99" Century="2000">
                                    </asp:MaskedEditExtender>--%>
                                                            <asp:CalendarExtender ID="txtDriverOnboardDateCalendarExtender2" runat="server" Animated="False"
                                                                Enabled="True" FirstDayOfWeek="Sunday" TargetControlID="txtDriverOnboardDate"
                                                                Format="yyyy-MM-dd">
                                                            </asp:CalendarExtender>
                                                            <asp:CustomValidator ID="txtDriverOnboardDateCustomValidator2" ClientValidationFunction="validateDateText"
                                                                runat="server" ErrorMessage="车辆到厂时间无效." Display="None" ControlToValidate="txtDriverOnboardDate"
                                                                OnServerValidate="DateValidator_ServerValidate"></asp:CustomValidator>
                                                        </td>
                                                        <td style="width: 10px;" />
                                                        <td class="ItemHeader">
                                                            车辆迟到时数
                                                        </td>
                                                        <td colspan="7" class="ItemContent">
                                                            <asp:Label ID="txtDriverDelayedHours" runat="server" Text='<%#Convert.ToDecimal(Eval("DriverDelayedHours")).ToString("#,###")%>'
                                                                Style="text-align: right"> </asp:Label>
                                                            </ContentTemplate>
                                                        </td>
                                                    </tr>
                                                    <tr class="ItemAlternating">
                                                        <td class="ItemHeader">
                                                            <label>
                                                                延迟到厂原因</label>
                                                        </td>
                                                        <td colspan="7" class="ItemContent">
                                                            <asp:TextBox ID="txtDriverDelayedReasons" runat="server" Text='<%#Bind("DriverDelayedReasons") %>'
                                                                Width="450px" TextMode="MultiLine" Height="80px"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="付款方式" ColumnSpan="2">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlPaymentMethod" DataSourceID="ddsPaymentMethod" AppendDataBoundItems="True"
                                        runat="server" DataTextField="Name" DataValueField="Value">
                                    </asp:DropDownList>
                                    <NetDon:DictionaryDataSource ID="ddsPaymentMethod" runat="server" CategoryName="付款方式"
                                        EmptyItemType="Select">
                                    </NetDon:DictionaryDataSource>
                                    <uc1:RequiredMark ID="RequiredMark8" runat="server" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="ddlPaymentMethod"
                                        Display="None" ErrorMessage="请输入付款方式" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                </ContentTemplate>
                            </NetDon:FormItem>
                            <NetDon:FormItem HeaderText="调车成本异常说明" ColumnSpan="2">
                                <ContentTemplate>
                                    <asp:TextBox ID="txtShuntingCostExceptionsComment" runat="server" Text='<%#Bind("ShuntingCostExceptionComment") %>'
                                        Width="450px" TextMode="MultiLine" Height="80px"></asp:TextBox>
                                </ContentTemplate>
                            </NetDon:FormItem>
                        </Items>
                    </NetDon:FormPanel>
                </td>
            </tr>
            <tr>
                <td style="padding-left: 150px">
                    <asp:Button ID="btnSave" runat="server" SkinID="Button80" Text="保存" OnClick="btnSave_Click" />
                    <asp:Button ID="btnCancel" runat="server" SkinID="Button80" Text="取消" CausesValidation="false" />
                    <NetDon:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="true"
                        ShowSummary="false" />
                </td>
            </tr>
            <tr>
                <td style="padding-left: 150px; padding-top: 4px;">
                    <asp:Button ID="btnSaveAndNext" runat="server" SkinID="Button120" OnClick="btnSaveAndNext_Click"
                        Text="保存并编辑下一个" />
                    <asp:Button ID="btnNext" runat="server" SkinID="Button80" Text="下一个" OnClick="btnNext_Click"
                        CausesValidation="False" />
                    <asp:Button ID="btnPrevious" runat="server" SkinID="Button80" Text="上一个" OnClick="btnPrevious_Click"
                        CausesValidation="False" />
                    <asp:Button ID="btnSaveAndPrevious" runat="server" SkinID="Button120" OnClick="btnSaveAndPrevious_Click"
                        Text="保存并编辑上一个" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:HiddenField ID="fieldIds" runat="server" />
    <asp:HiddenField ID="hiddenActualEntruckingAmount" runat="server" />
    <asp:Button ID="btnReLoadIds" runat="server" SkinID="Hidden" OnClick="btnReLoadIds_Click"
        CausesValidation="false" />
</asp:Content>
